﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true"
    CodeBehind="ListAlbum.aspx.cs" Inherits="VINETLIFE.AdminCP.ListAlbum" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        Danh sách Album</h2>
    <asp:GridView ID="gvAlbum" DataKeyNames="AlbumID" runat="server" AutoGenerateColumns="False"
        CssClass="tstyle1" OnRowDeleting="gvAlbum_RowDeleting" OnSelectedIndexChanged="gvAlbum_SelectedIndexChanged"
        PageSize="100" Width="100%" PagerStyle-CssClass="pgr">
        <Columns>
            <asp:BoundField DataField="Title" HeaderText="Tiêu đề" ItemStyle-Width="40%" />
            <asp:TemplateField ItemStyle-Width="10%" HeaderText="Ảnh đại diện" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href='/Media/<%#Eval("AnhAlbum")%>' class="fancyboxx">
                        <img alt='<%#Eval("Title") %>' src='/Media/<%#Eval("AnhAlbum") %>' width="75px" height="50px" />
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField ItemStyle-Width="20%" HeaderText="Phân loại" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%#TypeX(Eval("Type")) %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="OrderID" HeaderText="Thứ tự" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"/>
            <asp:TemplateField HeaderText="Thao tác" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                    <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("AlbumID") %>'
                        CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Thêm mới" CssClass="shiny-blue" />
</asp:Content>
